<template>
	<view>
		<view class="icon u-m-b-80">
			<u-icon name="checkmark-circle-fill" color="#fab6b6" size="200" label="交易成功" label-size="50" label-pos="bottom" ></u-icon>
			
		</view>
		<view class="orderId">
			<text style="font-weight: bolder;">订单号：</text>{{oid}}
			
			
		</view>
		<view class="orderId">
			
			<text style="font-weight: bolder;">交易流水号：</text>{{outTradeNo}}
		</view>
		
		<view class="btn u-flex">
			<u-button @click="toIndex" type="warning" shape="circle">返回首页</u-button>
			<u-button @click="toOrder" type="warning" shape="circle">查看订单</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				outTradeNo:0,
				oid:0
			}
		},
		onLoad(val){
			if(val != null){
				this.oid = val['oid']
				this.outTradeNo = val['outTradeNo']
				console.log(this.outTradeNo)
			}
		},
		methods: {
			toIndex(){
				this.$u.route({
					type: 'switchTab',
					url: 'pages/index/index'
				})
			},
			toOrder(){
				this.$u.route({
					type: 'redirect',
					url: 'pages/center/allOrder'
				})
			}
		}
	}
</script>

<style>
	.orderId{
		font-size: 34rpx;
	}
	.icon,.orderId{
		width: 100%;
		margin: 30rpx auto;
		text-align: center;
	}
</style>
